package cn.zf.spring5.factorybean;

import cn.zf.spring5.collectiontype.Cource;
import org.springframework.beans.factory.FactoryBean;

public class MyBean implements FactoryBean<Cource> {


    //定义返回bean
    @Override
    public Cource getObject() throws Exception {
        Cource cource = new Cource();
        cource.setCname("abc");
        return cource;
    }

    @Override
    public Class<?> getObjectType() {
        return null;
    }

    @Override
    public boolean isSingleton() {
        return false;
    }
}
